﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ManageMaintainDummy.ascx.vb"
    Inherits="WebForm_ManageProduct_ManageMaintainDummy" %>

<script type="text/javascript">
  function   JHshNumberText()   
  {   
      if(!(((window.event.keyCode>=48)&&(window.event.keyCode<=57))||(window.event.keyCode==13)||(window.event.keyCode==46)||(window.event.keyCode==45)))   
      {   
            window.event.keyCode=0;   
      }   
  }   
</script>

<div style="background-color: #351D26">
    <asp:UpdatePanel ID="up" runat="server">
        <ContentTemplate>
            <asp:MultiView ID="mvEmployee" runat="server" ActiveViewIndex="0">
                <asp:View ID="vwSearch" runat="server">
                    <fieldset id="plSearch" style="border-color: #4E333B" runat="server">
                        <legend class="white2">
                            <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:plSearch.GroupingText%>" />
                        </legend>
                        <table width="100%" cellpadding="2" cellspacing="0">
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblDivision" Font-Bold="true" runat="server" meta:resourcekey="lblDivision"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlDivision" runat="server" AutoPostBack="True" />
                                </td>
                                <td align="right">
                                </td>
                                <td align="left">
                                </td>
                                <td align="right">
                                </td>
                                <td align="left">
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblSignature" runat="server" meta:resourcekey="lblSignature"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlSignature" AutoPostBack="true" runat="server" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="lblBrand" runat="server" meta:resourcekey="lblBrand"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlBrand" AutoPostBack="true" runat="server" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="lblSub_Brand" runat="server" meta:resourcekey="lblSub_Brand"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlSub_Brand" AutoPostBack="true" runat="server" />
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblReference" runat="server" meta:resourcekey="lblReference"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlReference" AutoPostBack="true" runat="server" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="lblNuance" runat="server" meta:resourcekey="lblNuance"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlNuance" AutoPostBack="true" runat="server" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="lblAxe" runat="server" meta:resourcekey="lblAxe"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlAxe" AutoPostBack="true" runat="server" />
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblSub_Axe" runat="server" meta:resourcekey="lblSub_Axe"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlSub_Axe" AutoPostBack="true" runat="server" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="lblClass" runat="server" meta:resourcekey="lblClass"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlClass" AutoPostBack="true" runat="server" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="lblFunction" runat="server" meta:resourcekey="lblFunction"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlFunction" AutoPostBack="true" runat="server" />
                                </td>
                                <td align='center'>
                                    <asp:Button ID="btnSearch" CssClass="button" runat="server" meta:resourcekey="btnSearch" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                    <br />
                    <fieldset id="plList" style="border-color: #4E333B" runat="server">
                        <legend class="white2">
                            <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:plList.GroupingText%>" />
                        </legend>
                        <table width="100%" runat="server" id="tbDummyHierarchy">
                            <tr>
                                <td align="right">
                                    <asp:Button runat="server" ID="btnAddDummyHierarchy" meta:resourcekey="btnAddDummyHierarchy">
                                    </asp:Button>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <My:MyGridView ID="gv1" runat="server" AllowHoverEffect="True" AllowHoverSelect="True"
                                        TotalRowCount="0" AutoGenerateColumns="False" SkinID="pager" DataKeyNames="ID,Code,Description,LevelName,IsDummy,CreateBySystem">
                                        <Columns>
                                            <asp:TemplateField HeaderText="NO">
                                                <itemtemplate>
                                                <%#gv1.PageIndex * gv1.PageSize + gv1.Rows.Count + 1%>
                                            </itemtemplate>
                                                <itemstyle horizontalalign="Center" width="60px" />
                                                <headerstyle horizontalalign="Center" width="60px" />
                                            </asp:TemplateField>
                                            <asp:TemplateField meta:resourcekey="gvLevelName" SortExpression="LevelName">
                                                <itemtemplate>
                                                <%# Eval("LevelName") %>
                                            </itemtemplate>
                                                <itemstyle horizontalalign="Center" width="120px" />
                                                <headerstyle horizontalalign="Center" width="120px" />
                                            </asp:TemplateField>
                                            <asp:TemplateField meta:resourcekey="gvCode" SortExpression="Code">
                                                <itemtemplate>
                                                <%# Eval("Code") %>
                                            </itemtemplate>
                                                <itemstyle horizontalalign="Center" width="150px" />
                                                <headerstyle horizontalalign="Center" width="150px" />
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="Description" meta:resourcekey="gvDescription" SortExpression="Description" />
                                            <asp:TemplateField>
                                                <itemtemplate>
                                                <asp:Button runat="server" ID="btnEdit" CommandName="EditDummyHierarchy" meta:resourcekey="btnEdit"></asp:Button> 
                                                <asp:Button runat="server" ID="btnDelete" CommandName="DeleteDummyHierarchy" meta:resourcekey="btnDelete"></asp:Button>     
                                                <ajaxToolkit:ConfirmButtonExtender TargetControlID="btnDelete" ID="ConfirmButtonExtender1" meta:resourcekey="cbeDelete" runat="server">
                                                </ajaxToolkit:ConfirmButtonExtender>
                                            </itemtemplate>
                                                <itemstyle horizontalalign="Center" width="120px" />
                                                <headerstyle horizontalalign="Center" width="120px" />
                                            </asp:TemplateField>
                                        </Columns>
                                    </My:MyGridView>
                                </td>
                            </tr>
                        </table>
                        <table width="100%" runat="server" id="tbDummyProduct">
                            <tr>
                                <td align="right">
                                    <asp:Button runat="server" ID="btnAddDummyProduct" meta:resourcekey="btnAddDummyProduct">
                                    </asp:Button>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <My:MyGridView ID="gv2" runat="server" AllowHoverEffect="True" AllowHoverSelect="True"
                                        TotalRowCount="0" AutoGenerateColumns="False" SkinID="pager" DataKeyNames="SapCode,ProdHierarchy,Description,LocalDescription,MMPP,MaterialType,IsDummy,PAllow,ListP,STD">
                                        <Columns>
                                            <asp:TemplateField HeaderText="NO">
                                                <itemtemplate>
                                                <%#gv2.PageIndex * gv2.PageSize + gv2.Rows.Count + 1%>
                                            </itemtemplate>
                                                <itemstyle horizontalalign="Center" width="60px" />
                                                <headerstyle horizontalalign="Center" width="60px" />
                                            </asp:TemplateField>
                                            <asp:TemplateField meta:resourcekey="gvSapCode" SortExpression="SapCode">
                                                <itemtemplate>
                                                <%#MyObj.GetAreaCode() + Eval("SapCode")%>
                                            </itemtemplate>
                                                <itemstyle horizontalalign="Center" width="120px" />
                                                <headerstyle horizontalalign="Center" width="120px" />
                                            </asp:TemplateField>
                                            <asp:TemplateField meta:resourcekey="gvProdHierarchy" SortExpression="ProdHierarchy">
                                                <itemtemplate>
                                                <%#Eval("ProdHierarchy")%>
                                            </itemtemplate>
                                                <itemstyle horizontalalign="Center" width="150px" />
                                                <headerstyle horizontalalign="Center" width="150px" />
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="Description" meta:resourcekey="gvDescription" SortExpression="Description" />
                                            <asp:TemplateField meta:resourcekey="gvMMPP" SortExpression="MMPP_Text">
                                                <itemtemplate>
                                                <%#Eval("MMPP_Text")%>
                                            </itemtemplate>
                                                <itemstyle horizontalalign="Center" width="120px" />
                                                <headerstyle horizontalalign="Center" width="120px" />
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <itemtemplate>
                                                <asp:Button runat="server" ID="btnEdit" CommandName="EditDummyProduct" meta:resourcekey="btnEdit"></asp:Button>   
                                                <asp:Button runat="server" ID="btnDelete" CommandName="DeleteDummyProduct" meta:resourcekey="btnDelete"></asp:Button>     
                                                <ajaxToolkit:ConfirmButtonExtender TargetControlID="btnDelete" ID="cbeDelete" meta:resourcekey="cbeDelete" runat="server">
                                                </ajaxToolkit:ConfirmButtonExtender>
                                            </itemtemplate>
                                                <itemstyle horizontalalign="Center" width="120px" />
                                                <headerstyle horizontalalign="Center" width="120px" />
                                            </asp:TemplateField>
                                        </Columns>
                                    </My:MyGridView>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </asp:View>
                <asp:View ID="vwAddDummyHierarchy" runat="server">
                    <fieldset id="plAddDummyHierarchy" style="border-color: #4E333B" runat="server">
                        <legend class="white2">
                            <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:plAddDummyHierarchy.GroupingText%>" />
                        </legend>
                        <table>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label2" runat="server" meta:resourcekey="lblLevelDescription"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="lblLevelDescription" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label1" runat="server" meta:resourcekey="lblLevelName"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="lblLevelName" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblProductHierarchy" runat="server" meta:resourcekey="lblProductHierarchy"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="lblParentCode" runat="server"></asp:Label>
                                    <asp:TextBox ID="txtProductHierarchy" MaxLength="2" Width="20px" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvProductHierarchy" runat="server" ControlToValidate="txtProductHierarchy"
                                        Display="None" ValidationGroup="vDummyHierarchy" SetFocusOnError="true" meta:resourcekey="rfvProductHierarchy"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblDescription" runat="server" meta:resourcekey="lblDescription"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtDescription" MaxLength="50" Width="400px" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvDescription" runat="server" ControlToValidate="txtDescription"
                                        Display="None" ValidationGroup="vDummyHierarchy" SetFocusOnError="true" meta:resourcekey="rfvDescription"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="2">
                                    <asp:Button ID="btnSaveDummyHierarchy" ValidationGroup="vDummyHierarchy" runat="server"
                                        meta:resourcekey="btnSaveDummyHierarchy" />
                                    <asp:Button ID="btnCancelDummyHierarchy" runat="server" meta:resourcekey="btnCancelDummyHierarchy" />
                                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                                        ShowSummary="false" ValidationGroup="vDummyHierarchy" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </asp:View>
                <asp:View ID="vwAddDummyProduct" runat="server">
                    <fieldset id="plAddDummyProduct" style="border-color: #4E333B" runat="server">
                        <legend class="white2">
                            <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:plAddDummyProduct.GroupingText%>" />
                        </legend>
                        <table>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label3" runat="server" meta:resourcekey="lblLevelDescription"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="lblProdLevelDescription" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label7" runat="server" meta:resourcekey="lblProductHierarchy"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtProdHierarchy" MaxLength="50" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvProdHierarchy" runat="server" ControlToValidate="txtProdHierarchy"
                                        Display="None" ValidationGroup="vDummyProduct" SetFocusOnError="true" meta:resourcekey="rfvProductHierarchy"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label5" runat="server" meta:resourcekey="lblSapCode"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtSapCode" MaxLength="8" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvSapCode" runat="server" ControlToValidate="txtSapCode"
                                        Display="None" ValidationGroup="vDummyProduct" SetFocusOnError="true" meta:resourcekey="rfvSapCode"
                                        Enabled="false"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label9" runat="server" meta:resourcekey="lblDescription"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtProdDescription" MaxLength="50" Width="400px" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvProdDescription" runat="server" ControlToValidate="txtProdDescription"
                                        Display="None" ValidationGroup="vDummyProduct" SetFocusOnError="true" meta:resourcekey="rfvDescription"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label4" runat="server" meta:resourcekey="lblLocalDescription"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtLocalDescription" MaxLength="50" Width="400px" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvLocalDescription" runat="server" ControlToValidate="txtLocalDescription"
                                        Display="None" ValidationGroup="vDummyProduct" SetFocusOnError="true" meta:resourcekey="rfvLocalDescription"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label6" runat="server" meta:resourcekey="lblMMPP"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlMMPP" runat="server" />
                                    <asp:RequiredFieldValidator InitialValue="" ID="rfvMMPP" runat="server" ControlToValidate="ddlMMPP"
                                        Display="None" ValidationGroup="vDummyProduct" SetFocusOnError="true" meta:resourcekey="rfvMMPP"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label8" runat="server" meta:resourcekey="lblPAllow"></asp:Label>
                                </td>
                                <td align="left" class="white2">
                                    <asp:TextBox ID="txtPAllow" Columns="3" onkeypress="JHshNumberText()" MaxLength="10"
                                        runat="server"></asp:TextBox>%
                                    <asp:RangeValidator ID="rvPAllow" ErrorMessage="The P.Allowance is over Range(0~100)!!"
                                        Display="None" SetFocusOnError="true" ValidationGroup="vDummyProduct" Type="Integer"
                                        runat="server" ControlToValidate="txtPAllow" MaximumValue="100" MinimumValue="0"></asp:RangeValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label10" runat="server" meta:resourcekey="lblListP"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtListP" Columns="3" onkeypress="JHshNumberText()" MaxLength="10"
                                        runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label11" runat="server" meta:resourcekey="lblSTD"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtSTD" Columns="3" onkeypress="JHshNumberText()" MaxLength="10"
                                        runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label12" Visible="false" runat="server" meta:resourcekey="lblAutoFill"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:CheckBox ID="chkAutoFill" Text="Auto Fill" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="2">
                                    <asp:Button ID="btnSaveDummyProduct" ValidationGroup="vDummyProduct" runat="server"
                                        meta:resourcekey="btnSaveDummyProduct" />
                                    <asp:Button ID="btnCancelDummyProduct" runat="server" meta:resourcekey="btnCancelDummyProduct" />
                                    <asp:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="True"
                                        ShowSummary="false" ValidationGroup="vDummyProduct" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </asp:View>
            </asp:MultiView>
        </ContentTemplate>
    </asp:UpdatePanel>
</div>
